package com.zzr.zzrbackend.mapper;

import com.zzr.zzrbackend.pojo.domain.DisabuseRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DisabuseRecordMapper {
    List<DisabuseRecord> selectDisabuseListByChildId(Integer childId);

    List<DisabuseRecord> selectAllDisabuseList();

    List<DisabuseRecord> selectAllAcceptByVolunteerId(Integer Id);

    DisabuseRecord selectDisabuseRecordByDisabuseId(Integer disabuseId);

    DisabuseRecord selectById(Integer Id);

    List<DisabuseRecord> selectByType(Integer type);

    Integer insert(DisabuseRecord disabuseRecord);

    Integer setSolve(Integer disabuseId, Integer userId);

    Integer setAcceptSolve(Integer disabuseId, Integer userId);

    Integer setFinish(Integer disabuseId, Integer userId);

    DisabuseRecord getLatestDisabuseByChildId(Integer childId);

    Integer setAcceptId(Integer disabuseId, Integer volunteerId);

    Integer selectAcceptIdByDisabuseId(Integer disabuseId);

    Integer selectCountByUserId(Integer userId);

    List<Integer> selectVolunteerIdByChildId(Integer childId);

    List<Integer> selectChildIdByVolunteerId(Integer volunteerId);

    Integer selectVolunteerIdByChildIdAndDisabuseId(Integer childId, Integer disabuseId);

    Integer getAllDisabuseList();

}
